package com.gugee.tiktok.data.consumer.challenge.core.service.mapper;

import com.gugee.tiktok.common.model.es.challenge.ESWeekGrowth;
import com.gugee.tiktok.common.model.mysql.ChallengeRecord;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ChallengeRecordMapper {

    @Mapping(target = "userCount", source = "userCount")
    @Mapping(target = "viewCount", source = "viewCount")
    @Mapping(target = "userGrowth", source = "userGrowth")
    @Mapping(target = "viewGrowth", source = "viewGrowth")
    @Mapping(target = "dateCode", source = "dateCode")
    ESWeekGrowth mapperToES(ChallengeRecord challengeRecord);
    List<ESWeekGrowth> mapperToES(List<ChallengeRecord> challengeRecords);
}
